//
//  HttpConnctionManager.h
//  hellomui
//
//  Created by zhangtao on 15/9/30.
//  Copyright © 2015年 zt.td. All rights reserved.
//

#import "AFHTTPRequestOperationManager.h"
#import "AFHTTPRequestOperation.h"
#import "PublicDefine.h"
@interface HttpConnctionManager : AFHTTPRequestOperationManager

@property (strong,nonatomic)NSDictionary *grouplist;

SINGLETON_FOR_HEADER(HttpConnctionManager);

typedef void (^SuccessedBlock)(NSDictionary *succeedResult);

typedef void (^SuccessedArrayBlock)(NSArray *succeedResult);//zt


typedef void (^downFileSuccessedBlock)(NSString *lcoalPath);

typedef void (^FailedBlock)(AFHTTPRequestOperation *response, NSError *error);

typedef void (^FailBlock)(NSError *error);

#pragma mark - Public
//用户登录
- (void)startLogin:(NSString *)username andPassword:(NSString *)password andSuccessedBlock:(SuccessedBlock)success andFailedBlock:(FailedBlock)failed;

- (void)startMulitDataPost:( NSString *)url
                  postFile:(NSData *)uploadFileData
                  paragram:(NSDictionary *)para
            successedBlock:(SuccessedBlock)success
               failedBolck:(FailedBlock)failed;

-(void)requestParam:(NSDictionary *)dic andUrl:(NSString *)url andSuccessedBlock:(SuccessedBlock)success andFailedBlock:(FailedBlock)failed;     //修改密码---zt

-(void)postURl:(NSString *)url fileData:(NSData *)data param:(NSDictionary *)dic andSuccessedBlock:(SuccessedBlock)success andFailedBlock:(FailedBlock)failed;

//get    __back->array
-(void)GetRequestParam:(NSDictionary *)dic andUrl:(NSString *)url andSuccessedArrayBlock:(SuccessedArrayBlock)success andFailedBlock:(FailedBlock)failed;

//post  __back->dic
-(void)PostRequestParam:(NSDictionary *)dic andUrl:(NSString *)url andSuccessedArrayBlock:(SuccessedArrayBlock)success andFailedBlock:(FailedBlock)failed;

//-(void)GetRequestParam:(NSDictionary *)dic andUrl:(NSString *)url andSuccessedBlock:(SuccessedBlock)success andFailedBlock:(FailedBlock)failed;
@end
